<template>
  <div class="fixedBottom">
    <router-link :to="{path:'/remind'}">
      <a class="el-msg">
        <cite class="message-tips" v-if="num">{{num}}</cite>
        <img src="../../static/images/msg.png" alt="">
      </a>
    </router-link>
    <!--<a  class="toTop backToTop" @click.stop="backToTop" ref="backToTop" >-->
      <!--<img src="../../static/images/toTop.png" alt="">-->
    <!--</a>-->
  </div>
</template>
<script>
  var mdSecret ='fangyou968123456'
  import {strToHexCharCode,toFixedBit,dec2hex,formatTime } from  '@/utils/index.js'
  export default({
    data(){
        return {
            num:0
        }

    },
    methods:{
      initData(){
        var currentTime =(+new Date(formatTime(new Date()))/1000)
        this.axios.get('/api/v1/accout/usermessagecount').then((res)=>{
            console.log(res.data.code)
              if(res.data.code==0){
                  this.num=res.data.data.user_message_count
              }

        })
      },
      backToTop(){

          $('body,html').animate({
            scrollTop:0
          })
      }
    },
    mounted(){
        this.initData()
    }
  })
</script>

<style>

</style>
